home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / pxftimes.z / pxftimes
Encoding:
Text File  |  1998-10-30  |  4.2 KB  |  95 lines

  1. PXFTIMES(3F)                                           Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFTTIIMMEESS - Gets process times
  6.  
  7. SSYYNNOOPPSSIISS
  8.      SSUUBBRROOUUTTIINNEE PPXXFFTTIIMMEESS ((_j_t_m_s,, _i_t_i_m_e,, _i_e_r_r_o_r))
  9.      IINNTTEEGGEERR _j_t_m_s,, _i_t_i_m_e,, _i_e_r_r_o_r
  10.  
  11. IIMMPPLLEEMMEENNTTAATTIIOONN
  12.      UNICOS, UNICOS/mk, and IRIX systems
  13.  
  14. SSTTAANNDDAARRDDSS
  15.      IEEE standard interface for FORTRAN 77
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  19.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  20.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  21.      7.2 F77 compiler.
  22.  
  23.      The PPXXFFTTIIMMEESS subroutine uses the ttiimmeess(2) system call to access system
  24.      and user CPU time and wall-clock time for the current process and any
  25.      child processes.
  26.  
  27.      Components of the ttmmss structure are:
  28.  
  29.      * ttmmss__uuttiimmee: User CPU time
  30.  
  31.      * ttmmss__ssttiimmee: System CPU time
  32.  
  33.      * ttmmss__ccuuttiimmee: User CPU time of terminated child processes
  34.  
  35.      * ttmmss__ccssttiimmee:  System CPU time of terminated child processes
  36.  
  37.      The processing time for a child process is included in the ttmmss__ccuuttiimmee
  38.      and ttmmss__ccssttiimmee elements of the ttmmss structure when the parent process
  39.      waits for child process termination.
  40.  
  41.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  42.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  43.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  44.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  45.      IRIX, the default kind is KKIINNDD==44.
  46.  
  47.      The following is a list of valid arguments for this routine:
  48.  
  49.      _j_t_m_s      A handle of type _t_m_s created with PPXXFFSSTTRRUUCCTTCCRREEAATTEE(3F).
  50.  
  51.      _i_t_i_m_e     An output integer variable for the number of system hardware
  52.                clock ticks since some arbitrary point in the past (for
  53.                example, system startup time).  This point does not change
  54.                from one invocation to another during the execution of the
  55.                process.
  56.  
  57.      _i_e_r_r_o_r    An output integer variable that contains zero if PPXXFFTTIIMMEESS
  58.                was successful or nonzero if PPXXFFTTIIMMEESS was not successful.
  59.  
  60.      PPXXFFTTIIMMEESS may return the EEBBAADDHHAANNDDLLEE error value if _j_t_m_s is an invalid
  61.      handle or has an incorrect handle type.
  62.  
  63. EEXXAAMMPPLLEESS
  64.      This example shows how to use the PPXXFFTTIIMMEESS routine to retrieve system
  65.      and user CPU time information since the beginning of process
  66.      execution.
  67.  
  68.                 program testpxf
  69.                 integer itime, jtms, ierr, itmp
  70.           c create the tms struct
  71.                 call PXFSTRUCTCREATE('tms',jtms,ierr)
  72.                 print *,'structcreate error = ',ierr
  73.           c call PXFTIMES and print out returned information
  74.                 call PXFTIMES(jtms,itime,ierr)
  75.                 print *,'time = ',itime
  76.                 call PXFINTGET(jtms,'tms_utime',itmp,ierr)
  77.                 print *,'tms_utime = ',itmp,' ',ierr
  78.                 call PXFINTGET(jtms,'tms_stime',itmp,ierr)
  79.                 print *,'tms_stime = ',itmp,' ',ierr
  80.                 call PXFINTGET(jtms,'tms_cutime',itmp,ierr)
  81.                 print *,'tms_cutime = ',itmp,' ',ierr
  82.                 call PXFINTGET(jtms,'tms_cstime',itmp,ierr)
  83.                 print *,'tms_cstime = ',itmp,' ',ierr
  84.           c free the tms struct
  85.                 call PXFSTRUCTFREE(jtms,ierr)
  86.                 end
  87.  
  88. SSEEEE AALLSSOO
  89.      ttiimmeess(2)
  90.      PPXXFFSSTTRRUUCCTTCCRREEAATTEE(3F)
  91.  
  92.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  93.      2165, for the printed version of this man page.
  94.  
  95.